from django.urls import path,re_path
from disease.views import DiseaseDirectionView, DiseaseCategoryView, DiseaseView, DiseaseMessageView, \
    DiseaseMessageDetailView,RelatedArticlesView

urlpatterns = [
    path('direction/', DiseaseDirectionView.as_view()),
    # +表示1次或多次，*表示0次或多次，这里必须要有数字，无方向就是0，有方向就是>0
    re_path(r'^category/(?P<directionID>\d+)/$', DiseaseCategoryView.as_view()),
    re_path(r'^disease/(?P<directionID>\d+)/(?P<categoryID>\d+)/$', DiseaseView.as_view()),
    re_path(r'^message/(?P<directionID>\d+)/(?P<categoryID>\d+)/(?P<diseaseID>\d+)/$', DiseaseMessageView.as_view()),
    re_path(r'^detail/(?P<messageID>\d+)/$',DiseaseMessageDetailView.as_view()),
    path('related/<int:messageID>/',RelatedArticlesView.as_view()),
]